package wechat.base.snd;

import org.eclipse.xtend.lib.annotations.Accessors;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.eclipse.xtext.xbase.lib.Pure;
import org.json.JSONObject;
import wechat.base.snd.encoding.JsonPut;

@SuppressWarnings("all")
public class Contact {
  @Accessors
  private String userid;
  
  @Accessors
  private String name;
  
  @Accessors
  private String department;
  
  @Accessors
  private String position;
  
  @Accessors
  private String mobile;
  
  @Accessors
  private String gender;
  
  @Accessors
  private String email;
  
  @Accessors
  private String weixinid;
  
  @Accessors
  private String avatar_mediaid;
  
  @Accessors
  private String extattr;
  
  public Contact(final String weixinid, final String name) {
    this.name = name;
    this.weixinid = weixinid;
    this.userid = weixinid;
  }
  
  public JSONObject jsonBuilder() {
    JsonPut _xblockexpression = null;
    {
      JsonPut _jsonPut = new JsonPut();
      final Procedure1<JsonPut> _function = new Procedure1<JsonPut>() {
        public void apply(final JsonPut it) {
          it.putObj("userid", Contact.this.userid);
          it.putObj("name", Contact.this.name);
          it.putObj("department", Contact.this.department);
          it.putObj("position", Contact.this.position);
          it.putObj("mobile", Contact.this.mobile);
          it.putObj("gender", Contact.this.gender);
          it.putObj("email", Contact.this.email);
          it.putObj("weixinid", Contact.this.weixinid);
          it.putObj("avatar_mediaid", Contact.this.avatar_mediaid);
          it.putObj("extattr", Contact.this.extattr);
        }
      };
      final JsonPut jo = ObjectExtensions.<JsonPut>operator_doubleArrow(_jsonPut, _function);
      _xblockexpression = jo;
    }
    return _xblockexpression;
  }
  
  @Pure
  public String getUserid() {
    return this.userid;
  }
  
  public void setUserid(final String userid) {
    this.userid = userid;
  }
  
  @Pure
  public String getName() {
    return this.name;
  }
  
  public void setName(final String name) {
    this.name = name;
  }
  
  @Pure
  public String getDepartment() {
    return this.department;
  }
  
  public void setDepartment(final String department) {
    this.department = department;
  }
  
  @Pure
  public String getPosition() {
    return this.position;
  }
  
  public void setPosition(final String position) {
    this.position = position;
  }
  
  @Pure
  public String getMobile() {
    return this.mobile;
  }
  
  public void setMobile(final String mobile) {
    this.mobile = mobile;
  }
  
  @Pure
  public String getGender() {
    return this.gender;
  }
  
  public void setGender(final String gender) {
    this.gender = gender;
  }
  
  @Pure
  public String getEmail() {
    return this.email;
  }
  
  public void setEmail(final String email) {
    this.email = email;
  }
  
  @Pure
  public String getWeixinid() {
    return this.weixinid;
  }
  
  public void setWeixinid(final String weixinid) {
    this.weixinid = weixinid;
  }
  
  @Pure
  public String getAvatar_mediaid() {
    return this.avatar_mediaid;
  }
  
  public void setAvatar_mediaid(final String avatar_mediaid) {
    this.avatar_mediaid = avatar_mediaid;
  }
  
  @Pure
  public String getExtattr() {
    return this.extattr;
  }
  
  public void setExtattr(final String extattr) {
    this.extattr = extattr;
  }
}
